<template>
  <Layout id="layout-css">
    <a-layout-sider v-model:collapsed="collapsed" :width="240" :trigger="null" collapsible>
      <div class="logo" />
      <a-menu v-model:selectedKeys="selectedKeys" theme="dark" mode="inline">
        <a-menu-item key="1">
          <user-outlined />
          <span>nav 1</span>
        </a-menu-item>
        <a-menu-item key="2">
          <video-camera-outlined />
          <span>nav 2</span>
        </a-menu-item>
        <a-menu-item key="3">
          <upload-outlined />
          <span>nav 3</span>
        </a-menu-item>
      </a-menu>
    </a-layout-sider>
    <Layout>
      <a-layout-header style="background: #fff; padding: 0">
        <menu-unfold-outlined
          v-if="collapsed"
          class="trigger"
          @click="() => (collapsed = !collapsed)"
        />
        <menu-fold-outlined v-else class="trigger" @click="() => (collapsed = !collapsed)" />
      </a-layout-header>
      <a-layout-content
        :style="{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }"
      >
        <a-tag closable>Tag 2</a-tag>
        <a-tag closable>Tag 2</a-tag>
        <a-tag closable>Tag 2</a-tag>
        <a-tag closable>Tag 2</a-tag>
        <a-tag closable>Tag 2</a-tag>
        <a-tag closable>Tag 2</a-tag>
        <a-tag closable>Tag 2</a-tag>
        Content
      </a-layout-content>
    </Layout>
  </Layout>
  <img :src="imag" />
</template>
<script lang="ts" setup>
  import { Layout } from 'ant-design-vue';
  import {
    UserOutlined,
    VideoCameraOutlined,
    UploadOutlined,
    MenuUnfoldOutlined,
    MenuFoldOutlined,
  } from '@ant-design/icons-vue';
  import { defineComponent, onMounted, ref } from 'vue';

  const selectedKeys = ref<string[]>(['1']);
  const collapsed = ref<boolean>(false);
  const imag = ref();
  onMounted(()=> {
    // axios.get('/api/user/ca').then(res=>{
    //   console.log(res.data.data)
    //   imag.value = res.data.data;
    // });
  });

</script>
<style>

#layout-css {
  height: 100%;
}

#layout-css .trigger {
  font-size: 18px;
  line-height: 54px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
}

#layout-css .trigger:hover {
  color: #1890ff;
}

#layout-css .logo {
  height: 32px;
  background: rgba(255, 255, 255, 0.3);
  margin: 16px;
}

.site-layout .site-layout-background {
  background: #fff;
}
</style>
